import request from '@/utils/request'

export default{
    createOrder(courseId){
        return request({
            url:`/order/order/createOrder/${courseId}`,
            method:'post'
        })
    },
    getOrderNo(orderNo){
        return request({
            url:`/order/order/getOrderNo/${orderNo}`,
            method:'get'
        })
    },
    //生成二维码的方法
    createNatvie(orderNo) {
        return request({
            url: '/order/pay-log/createNative/'+orderNo,
            method: 'get'
        })
    },

    //查询订单状态的方法
    //生成二维码的方法
    queryPayStatus(orderNo) {
        return request({
            url: '/order/pay-log/queryPayStatus/'+orderNo,
            method: 'get'
        })
    },

    isBuy(courseId){
        return request({
            url: `/order/order/getIsBuy/${courseId}`,
            method: 'get'
        })
    }
}